package com.ibsol.service
{
	import com.ibsol.database.PhotoDAO;
	
	import mx.collections.ArrayCollection;
	
	public class PhotoService{
		
		private var photoDAO:PhotoDAO;
		
		public function PhotoService(){
			photoDAO=new PhotoDAO();
		}
		
		/**
		 * 按fid（日程）查询最后一张的图片
		 * @param id 日程编号
		 **/
		public function getPhotoNameByFid(id:int):ArrayCollection{
			var ac:ArrayCollection=new ArrayCollection();
			photoDAO.loadRandomPhoto(id, "POI", function (actemp:ArrayCollection):void{
				ac=actemp;
			});
			return ac;
		}
	}
}